package com.example.monitorapp

import com.example.baselib.BaseRepository
import com.example.baselib.databean.ResponseData
import huaan.com.mvvmdemo.http.RetrofitClient
import retrofit2.Response

/**
 * Author: sxygsj
 * Date: 2020/4/21 16:31
 * Description: 绑定手机号，修改密码
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */
class UserInfoRepository :BaseRepository(){

    /**
     * 获取绑定手机验证码
     */
    suspend fun getBindVerCode(tel:String,token:String): Response<ResponseData<String>> = request{
        RetrofitClient.reqApi().getBindVerCode(tel,token)
    }

    suspend fun bindTel(tel: String, vercode: String, token: String):Response<ResponseData<String>> =request{
        RetrofitClient.reqApi().bindTel(tel,vercode,token)
    }

    suspend fun changePwd(oldPwd: String, newPwd: String, surePwd: String, token: String): Response<ResponseData<String>> =request{
            RetrofitClient.reqApi().changePwd(oldPwd,newPwd,surePwd,token)
    }

}